import React from "react";

interface RightButtonProps {
    list?: any[];
    onClick?: Function;
}

export interface RightSearchProps {
    keywords?: string;
    placeholder?: string;
    onClick?: Function;
    onClear?: Function;
}

export interface BreadCrumbsInterface {
    type?: string,
    path?: string,
    label?: string
    icon?: string
}

export interface LayoutProps {
    /**
     * @params 标题
     **/
    label?: string;
    /**
     * @params 副标题
     **/
    labelEm?: string;
    /**
     * @params 右侧组件
     **/
    rightComponent?: React.ReactNode;
    rightComponentProps?: RightButtonProps
    /**
     * @params breadCrumbs 面包屑
     * @params breadCrumbsOnClick 面包屑回调函数
     **/
    breadCrumbs?: BreadCrumbsInterface[];
    breadCrumbsOnClick?: Function;
    search?: boolean;
    searchProps?: RightSearchProps;

    [key: string]: any
}


export interface ButtonToolsInterface {
    dataSource: any[];
    onClick?: Function | any;
    onCancel?: Function;
    search?: boolean;
    searchProps?: RightSearchProps;
    size?: 'small' | 'large';
    from?: 'table' | 'normal';
    onSearch?: Function;
    showAdvancedSearch?: Function | any;
    leftExtra?: { render: Function }
    rightExtra?: { render: Function }

    [key: string]: any;
}